<?php
	session_start();
	if(!isset($_SESSION['login'])){
		header('location:../vue/index.php');
	}
	include '../model/model_sql.php';
	var_dump($_POST);
	$myvar = new SQLBlog();
        $comment=htmlentities($_POST['comment']);
        
	if($var=$myvar->AjouterCommentairePourPost($comment, $_SESSION['id'], $_POST['art_id'])){
		header('location:../vue/index.php');
	}else var_dump($var);
?>